Java threads and the JDBC driver

Поиск
Список
Период
Сортировка
От Herouth Maoz
Тема Java threads and the JDBC driver
Дата
Msg-id l03110704b222c3e19580@[147.233.159.109]
обсуждение исходный текст
Ответы Re: [INTERFACES] Java threads and the JDBC driver  (Peter T Mount <peter@retep.org.uk>)
Список pgsql-interfaces
As I understand it, the JDBC driver is not thread safe.

I am trying to figure out how much synchronization I need.

Is it safe to use separate ResultSets that originate from the same
Connection object concurrently? That is, lock the connection object, create
and perform the query into a new ResultSet, unlock the connection, and
proceed to use the ResultSet? If I do that, other threads may be issuing
queries while I'm still looping on the ResultSet.

It's supposed to be OK. But is it?

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma



В списке pgsql-interfaces по дате отправления:

Предыдущее
От: "Eric H. Buschelmann"
Дата:
Сообщение: Thanks
Следующее
От: Peter T Mount
Дата:
Сообщение: Re: [INTERFACES] Java threads and the JDBC driver